home *** CD-ROM | disk | FTP | other *** search
/ Freelog 115 / FreelogNo115-MaiJuin2013.iso / Internet / Filezilla Server / FileZilla_Server-0_9_41.exe / source / interface / misc / SBDestination.cpp < prev    next >
C/C++ Source or Header  |  2011-11-06  |  1KB  |  49 lines

  1. // SBDestination.cpp: implementation of the CSBDestination class.
  2. //
  3. //////////////////////////////////////////////////////////////////////
  4.  
  5. #include "stdafx.h"
  6. #include "SBDestination.h"
  7.  
  8. #if defined(_DEBUG) && !defined(MMGR)
  9. #undef THIS_FILE
  10. static char THIS_FILE[]=__FILE__;
  11. #define new DEBUG_NEW
  12. #endif
  13.  
  14. //////////////////////////////////////////////////////////////////////
  15. // Construction/Destruction
  16. //////////////////////////////////////////////////////////////////////
  17.  
  18. CSBDestination::CSBDestination(const HWND hParent, const int nTitleID)
  19.     : CBrowseForFolder(hParent, NULL, nTitleID)
  20. {
  21.  
  22. }
  23.  
  24. CSBDestination::~CSBDestination()
  25. {
  26.  
  27. }
  28.  
  29. void CSBDestination::SetInitialSelection(const CString & strPath)
  30. {
  31.     m_strInitialSelection = strPath;
  32. }
  33.  
  34. void CSBDestination::OnInit() const
  35. {
  36.     SetSelection(m_strInitialSelection);
  37.     SetStatusText(m_strInitialSelection);
  38. }
  39.  
  40. void CSBDestination::OnSelChanged(const LPITEMIDLIST pidl) const
  41. {
  42.     CString strBuffer;
  43.     if (SHGetPathFromIDList(pidl, strBuffer.GetBuffer(MAX_PATH)))
  44.         strBuffer.ReleaseBuffer();
  45.     else
  46.         strBuffer.ReleaseBuffer(0);
  47.     SetStatusText(strBuffer);
  48. }
  49.